

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>rgw-restore-bucket-index -- 试着把桶的对象恢复到它的桶索引 &mdash; Ceph Documentation</title>
  

  
  <link rel="stylesheet" href="../../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/graphviz.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/css/custom.css" type="text/css" />

  
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
        <script src="../../../_static/jquery.js"></script>
        <script src="../../../_static/_sphinx_javascript_frameworks_compat.js"></script>
        <script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
        <script src="../../../_static/doctools.js"></script>
        <script src="../../../_static/sphinx_highlight.js"></script>
    
    <script type="text/javascript" src="../../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../../genindex/" />
    <link rel="search" title="Search" href="../../../search/" /> 
</head>

<body class="wy-body-for-nav">

   
  <header class="top-bar">
    <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="../../../" class="icon icon-home" aria-label="Home"></a></li>
      <li class="breadcrumb-item active">rgw-restore-bucket-index -- 试着把桶的对象恢复到它的桶索引</li>
      <li class="wy-breadcrumbs-aside">
            <a href="../../../_sources/man/8/rgw-restore-bucket-index.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
  </header>
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #eee" >
          

          
            <a href="../../../" class="icon icon-home"> Ceph
          

          
          </a>

          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul>
<li class="toctree-l1"><a class="reference internal" href="../../../start/">Ceph 简介</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../install/">安装 Ceph</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../cephadm/">Cephadm</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../rados/">Ceph 存储集群</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../cephfs/">Ceph 文件系统</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../rbd/">Ceph 块设备</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../radosgw/">Ceph 对象网关</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mgr/">Ceph 管理器守护进程</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mgr/dashboard/">Ceph 仪表盘</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../monitoring/">监控概览</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api/">API 文档</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../architecture/">体系结构</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/developer_guide/">开发者指南</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../dev/internals/">Ceph 内幕</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../governance/">项目管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../foundation/">Ceph 基金会</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../ceph-volume/">ceph-volume</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../releases/general/">Ceph 版本（总目录）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../releases/">Ceph 版本（索引）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../security/">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../hardware-monitoring/">硬件监控</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../glossary/">Ceph 术语</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../jaegertracing/">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../translation_cn/">中文版翻译资源</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../../">Ceph</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
<div id="dev-warning" class="admonition note">
  <p class="first admonition-title">Notice</p>
  <p class="last">This document is for a development version of Ceph.</p>
</div>
  <div id="docubetter" align="right" style="padding: 5px; font-weight: bold;">
    <a href="https://pad.ceph.com/p/Report_Documentation_Bugs">Report a Documentation Bug</a>
  </div>

  
  <section id="rgw-restore-bucket-index">
<h1>rgw-restore-bucket-index -- 试着把桶的对象恢复到它的桶索引<a class="headerlink" href="#rgw-restore-bucket-index" title="Permalink to this heading"></a></h1>
<section id="id1">
<h2>提纲<a class="headerlink" href="#id1" title="Permalink to this heading"></a></h2>
<div class="line-block">
<div class="line"><strong>rgw-restore-bucket-index</strong></div>
</div>
</section>
<section id="id2">
<h2>描述<a class="headerlink" href="#id2" title="Permalink to this heading"></a></h2>
<p><strong class="program">rgw-restore-bucket-index</strong> 是一个<em>实验性的</em> RADOS 网关用户管理工具。
它能在数据存储池中扫描属于指定桶的对象，
并尝试将这些对象加回桶索引。
它应该作为桶索引发生<em>灾难性</em>丢失的<em>最后挽回手段</em>。
请仔细阅读以下<em>警告</em>。</p>
<p>该实用程序可处理常规（即未版本化的）桶、
已版本化的桶、和已暂停版本化的桶。</p>
</section>
<section id="id3">
<h2>警告<a class="headerlink" href="#id3" title="Permalink to this heading"></a></h2>
<p>该实用程序目前还是<em>试验性的</em>。</p>
<p>如果在运行此工具时，桶还在使用中，
那么结果将无法预测。</p>
<p>如果桶索引中只缺少某一些桶的对象，
结果也无法预测。这种情形，
应该考虑使用 <cite>radosgw-admin</cite> 的 “object reindex” 子命令，
将对象逐一恢复到桶索引中。</p>
<p>对于启用了版本控制的桶里面的对象，如果最新版本是删除标记，
它会被恢复。如果删除标记已经被新版本覆盖写入，
则不会恢复该删除标记。
这样应该对最终结果的影响最小，因为它恢复了最新版本，
而且之前的版本也都可以访问。</p>
</section>
<section id="id4">
<h2>命令行参数<a class="headerlink" href="#id4" title="Permalink to this heading"></a></h2>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-rgw-restore-bucket-index-b">
<span class="sig-name descname"><span class="pre">-b</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;bucket&gt;</span></span><a class="headerlink" href="#cmdoption-rgw-restore-bucket-index-b" title="Permalink to this definition"></a></dt>
<dd><p>指定要重新索引的桶。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-rgw-restore-bucket-index-p">
<span class="sig-name descname"><span class="pre">-p</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;pool&gt;</span></span><a class="headerlink" href="#cmdoption-rgw-restore-bucket-index-p" title="Permalink to this definition"></a></dt>
<dd><p>可选项，指定包含桶头部对象的数据存储池。
如果省略，此工具将尝试自行确定数据存储池。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-rgw-restore-bucket-index-r">
<span class="sig-name descname"><span class="pre">-r</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;realm-name&gt;</span></span><a class="headerlink" href="#cmdoption-rgw-restore-bucket-index-r" title="Permalink to this definition"></a></dt>
<dd><p>可选项，如果恢复的不是默认 realm ，
需要指定 realm 。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-rgw-restore-bucket-index-g">
<span class="sig-name descname"><span class="pre">-g</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;zonegroup-name&gt;</span></span><a class="headerlink" href="#cmdoption-rgw-restore-bucket-index-g" title="Permalink to this definition"></a></dt>
<dd><p>可选项，如果要恢复的不是默认域组，
需要指定域组。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-rgw-restore-bucket-index-z">
<span class="sig-name descname"><span class="pre">-z</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;zone-name&gt;</span></span><a class="headerlink" href="#cmdoption-rgw-restore-bucket-index-z" title="Permalink to this definition"></a></dt>
<dd><p>可选项，如果要恢复的不是默认域，
需要指定域。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-rgw-restore-bucket-index-l">
<span class="sig-name descname"><span class="pre">-l</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;rados-ls-output-file&gt;</span></span><a class="headerlink" href="#cmdoption-rgw-restore-bucket-index-l" title="Permalink to this definition"></a></dt>
<dd><p>可选项，指定包含数据存储池 rados 对象列表的一个文件。
由于列出数据存储池里的对象可能是一项费时费力的操作，
如果要恢复的是多个桶的索引，
重复使用同一份列表应该会更高效。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-rgw-restore-bucket-index-t">
<span class="sig-name descname"><span class="pre">-t</span></span><span class="sig-prename descclassname"> <span class="pre">&lt;temporary-directory&gt;</span></span><a class="headerlink" href="#cmdoption-rgw-restore-bucket-index-t" title="Permalink to this definition"></a></dt>
<dd><p>可选项，指定用于存储临时文件的目录。
临时文件的大小在很大程度上取决于所涉及的桶条目的数量，
因此临时目录所在分区的大小应该要容得下。</p>
</dd></dl>

<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-rgw-restore-bucket-index-y">
<span class="sig-name descname"><span class="pre">-y</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-rgw-restore-bucket-index-y" title="Permalink to this definition"></a></dt>
<dd><p>可选项，无需进一步提示即可继续。
如果没有该选项，本工具将显示一些信息，
并询问用户是否继续。如果提供了该选项，
本工具将直接继续。使用此选项时请谨慎。</p>
</dd></dl>

</section>
<section id="id5">
<h2>实例<a class="headerlink" href="#id5" title="Permalink to this heading"></a></h2>
<p>尝试为名字是 <em>summer-2023-photos</em> 的桶恢复索引：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ rgw-restore-bucket-index -b summer-2023-photos
</pre></div>
</div>
</section>
<section id="id6">
<h2>适用范围<a class="headerlink" href="#id6" title="Permalink to this heading"></a></h2>
<p><strong class="program">rgw-restore-bucket-index</strong> 是 Ceph 的一部分，这是个伸缩力强、开源、分布式的存储系统，更多信息参见 <a class="reference external" href="https://docs.ceph.com">https://docs.ceph.com</a> 。</p>
</section>
<section id="id7">
<h2>参考<a class="headerlink" href="#id7" title="Permalink to this heading"></a></h2>
<p><a class="reference internal" href="../radosgw-admin/"><span class="doc">radosgw-admin</span></a>(8)</p>
</section>
</section>



<div id="support-the-ceph-foundation" class="admonition note">
  <p class="first admonition-title">Brought to you by the Ceph Foundation</p>
  <p class="last">The Ceph Documentation is a community resource funded and hosted by the non-profit <a href="https://ceph.io/en/foundation/">Ceph Foundation</a>. If you would like to support this and our other efforts, please consider <a href="https://ceph.io/en/foundation/join/">joining now</a>.</p>
</div>


           </div>
           
          </div>
          <footer>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2016, Ceph authors and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).</p>
  </div>

   

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>